#ifndef SHUTTLE_SHIELD_ITEM_H
#define SHUTTLE_SHIELD_ITEM_H

#include "consts.h"
#include "cash.h"

class SHUTTLE_SHIELD_ITEM : public QGraphicsObject
{
    Q_OBJECT
    Q_PROPERTY(qreal transparent READ Transparent WRITE setTransparent)

private:
    GRAPHICS_PIXMAP_ITEM *item_pix;
    QPropertyAnimation *prop_anim;
    CASH *cash;
    SHIELD_ITEM_TYPE type;

public:
    explicit SHUTTLE_SHIELD_ITEM(SHIELD_ITEM_TYPE type, CASH *cash);
    ~SHUTTLE_SHIELD_ITEM();

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);
    QRectF boundingRect() const;
    QPainterPath shape() const;

    void init();
    void blink();
    

private:
//property
    qreal Transparent();
    void setTransparent(qreal value);
    
};

#endif // SHUTTLE_SHIELD_ITEM_H
